<style include="cr-shared-style settings-shared md-select">
  #search-wrapper {
    align-items: center;
    display: flex;
    min-height: var(--settings-row-min-height);
  }

  cr-policy-pref-indicator {
    padding-inline-end: 8px;
  }
</style>
<settings-animated-pages id="pages" section="osSearch"
    focus-config="[[focusConfig_]]">
  <div route-path="default">
    <template is="dom-if" if="[[!shouldShowQuickAnswersSettings_]]">
      <settings-search-engine
          deep-link-focus-id$="[[Setting.kPreferredSearchEngine]]">
      </settings-search-engine>
    </template>
    <template is="dom-if" if="[[shouldShowQuickAnswersSettings_]]">
      <cr-link-row id="search"
          id="searchSubpageTrigger"
          label="$i18n{searchSubpageTitle}"
          on-click="onSearchTap_"
          role-description="$i18n{subpageArrowRoleDescription}">
      </cr-link-row>
    </template>
    <!-- Google Assistant -->
    <template is="dom-if" if="[[isAssistantAllowed_]]">
      <cr-link-row
          class="hr"
          id="assistantSubpageTrigger"
          label="$i18n{searchGoogleAssistant}"
          sub-label="[[getAssistantEnabledDisabledLabel_(
              prefs.settings.voice_interaction.enabled.value)]]"
          on-click="onGoogleAssistantTap_"
          role-description="$i18n{subpageArrowRoleDescription}">
      </cr-link-row>
    </template>
  </div>
  <template is="dom-if" if="[[shouldShowQuickAnswersSettings_]]">
    <template is="dom-if" route-path="/osSearch/search">
      <settings-subpage page-title="$i18n{searchSubpageTitle}">
        <settings-search-subpage prefs="{{prefs}}">
        </settings-search-subpage>
      </settings-subpage>
    </template>
  </template>
  <template is="dom-if" if="[[isAssistantAllowed_]]">
    <template is="dom-if" route-path="/googleAssistant">
      <settings-subpage page-title="$i18n{googleAssistantPageTitle}">
        <settings-google-assistant-page prefs="{{prefs}}">
        </settings-google-assistant-page>
      </settings-subpage>
    </template>
  </template>
</settings-animated-pages>

<!-- Default Search Engine Selection Dialog -->
<template is="dom-if" if="[[showSearchSelectionDialog_]]" restamp>
  <os-settings-search-selection-dialog
      on-close="onSearchSelectionDialogClose_">
  </os-settings-search-selection-dialog>
</template>
